package smedi.ismedi.mobile.bff.controller.report;

import com.smedi.ismedi.report.api.feign.RemoteReportAppDashboardFeignApi;
import com.smedi.ismedi.report.api.model.dto.ReportDashboardDto;
import com.smedi.ismedi.report.api.model.request.ReportDashboardRequest;
import com.smedi.ismedi.web.starter.common.PaginationData;
import com.smedi.ismedi.web.starter.common.ResponseData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Api(tags = {"资料管理-app资料看板"})
@RequestMapping(value = "/mobilebff/v1/dashboard")
@RestController
public class RemoteReportAppDashboardController {

    @Autowired
    private RemoteReportAppDashboardFeignApi remoteReportAppDashboardFeignApi;

    @ApiOperation(value = "待填报", nickname = "待填报")
    @PostMapping("/appWait")
    public ResponseData<PaginationData<ReportDashboardDto>> getAppWait(@RequestBody ReportDashboardRequest request){
        return remoteReportAppDashboardFeignApi.getAppWait(request);
    }

    @ApiOperation(value = "已填报", nickname = "已填报")
    @PostMapping("/appFilled")
    public ResponseData<PaginationData<ReportDashboardDto>> getAppFilled(@RequestBody ReportDashboardRequest request){
        return remoteReportAppDashboardFeignApi.getAppFilled(request);
    }

    @ApiOperation(value = "逾期", nickname = "逾期")
    @PostMapping("/appOverdue")
    public ResponseData<PaginationData<ReportDashboardDto>> getAppOverdue(@RequestBody ReportDashboardRequest request){
        return remoteReportAppDashboardFeignApi.getAppOverdue(request);
    }

    @ApiOperation(value = "驳回", nickname = "驳回")
    @PostMapping("/appReject")
    public ResponseData<PaginationData<ReportDashboardDto>> getAppReject(@RequestBody ReportDashboardRequest request){
        return remoteReportAppDashboardFeignApi.getAppReject(request);
    }
}
